home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Events / ScreenPart.h < prev    next >
Text File  |  2000-06-23  |  825b  |  47 lines

  1. // ScreenPart.h
  2.  
  3. #ifndef ScreenPart_h
  4. #define ScreenPart_h
  5.  
  6. #ifndef PointObject_h
  7. #include "PointObject.h"
  8. #endif
  9. #ifndef Assert_h
  10. #include "Assert.h"
  11. #endif
  12.  
  13. #include <Windows.h>
  14.  
  15. class WindowObject;
  16.  
  17. class ScreenPart
  18.   {
  19.     public:
  20.         enum PartCode
  21.           {
  22.             desktop                = ::inDesk,
  23.             menuBar                = ::inMenuBar,
  24.             systemWindow        = ::inSysWindow,
  25.             windowContent        = ::inContent,
  26.             windowDragRegion    = ::inDrag,
  27.             windowGrowBox        = ::inGrow,
  28.             windowCloseBox        = ::inGoAway,
  29.             windowZoomInBox    = ::inZoomIn,
  30.             windowZoomOutBox    = ::inZoomOut
  31.           };
  32.     
  33.     private:
  34.         PartCode part;
  35.         WindowObject *window;
  36.     
  37.     public:
  38.         ScreenPart( PointObject );
  39.         
  40.         PartCode Type() const            { return part; }
  41.         
  42.         bool HasWindow() const            { return window != 0; }
  43.         WindowObject& Window() const    { Assert( HasWindow() ); return *window; }
  44.   };
  45.  
  46. #endif
  47.